const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const defConfig = getDefaultConfig(__dirname);
const {
  resolver: {sourceExts, assetExts},
} = defConfig;

module.exports = mergeConfig(defConfig, {
  transformer: {
    babelTransformerPath: require.resolve('./transformer.js'),
  },
  resolver: {
    assetExts: assetExts.filter(ext => ext !== 'svg'),
    sourceExts: [...sourceExts, 'css', 'scss', 'sass', 'less', 'svg'],
  },
});
